package com.vint.common;

import java.util.Random;

/*
 * 二叉树节点
 */
public class Node {
    public static int VAL_MAX = 10000;
    public static Random random = new Random();
    public int val;
    public Node next;
    public Node(int x) {
        val = x;
    }
    public static Node mockList(){
        boolean leaf = random.nextBoolean();
        Node root = null;
        if (leaf) {
            root = new Node(random.nextInt(VAL_MAX));
        }
        return root;
    }

    public static Node mockLoopList(){
        Node root = new Node(3);
        root.next = new Node(2);
        root.next.next = root;
        return root;
    }

    public static Node mockSpecific1(){
        Node root = new Node(3);
        root.next = new Node(2);
        return root;
    }

    public static void main(String[] args){
    }
}
